import { Body, Controller, Get, Post, Query } from '@nestjs/common'
import { EmailService } from './email.service'
import { ApiOperation, ApiTags } from '@nestjs/swagger'

@ApiTags('邮箱')
@Controller('email')
export class EmailController {
  constructor(private readonly emailService: EmailService) {}

  @ApiOperation({ summary: `获取验证码`, description: '获取验证码' })
  @Get('code')
  async sendEmailCode(@Query('address') address: string) {
    return this.emailService.sendEmailCode(address)
  }
}
